import React from 'react';
import {BrowserRouter as Router, Route, Switch} from 'react-router-dom';
import Home from './page/Home';
import "./common/common"
import "./common/Global"
import "./css/style.less";
import "./font/iconfont.css"
import Thermometer from "./page/thermometer";
import Demo1 from "./page/context"


//配置路径
const httpHead ="activity/dragonBoatFestival";
class App extends React.Component{
  constructor(props){
    super(props);
    global.app = this;
  }
    // componentDidMount() {
    //    global.app = this;
    // }

    render(){
        return (
                <div>
                  <Router basename={httpHead}>
                    <Switch>
                        <Route exact path="/" component={Home} />
                        <Route exact path="/thermometer" component={Thermometer} />
                        <Route exact path="/context" component={Demo1} />
                    </Switch>
                  </Router>
                    {
                        global.popupView.map((item)=>{
                            return item
                        })
                    }
                </div>
              )
    }
}

export default App;
